//
//  TKIMDataBase.h
//  TKIM
//
//  Created by liupm on 15/10/29.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TKIMDBProtocol.h"
#import "TKIMFMDB.h"

@interface TKIMDB : NSObject<TKIMDBProtocol>
@property(nonatomic,copy) NSString *dbPath;//数据库路径
@property(nonatomic,strong) TKIMFMDatabaseQueue *dbQueue;
@property(nonatomic,strong) TKIMFMDatabaseQueue *readDBQueue;

- (instancetype)initWithDBPath:(NSString *)dbPath dbQueue:(TKIMFMDatabaseQueue *)dbQueue;

/**
 *  @Author lpm, 16-08-29 14:08:02
 *
 *  @brief  建表（子类替换）
 */
-(void)creatTable;


/**
 *  @Author lpm, 16-07-26 10:07:27
 *
 *  @brief  插入和替换
 *
 *  @param dic
 *  @param db
 */
-(void)insertOrReplace:(NSMutableDictionary *)dic  db:(TKIMFMDatabase *)db tableName:(NSString *)tableName;

@end
